package com.wsoft.portal.controller;

import com.wsoft.portal.query.module.RenderQuery;
import com.wsoft.portal.service.IPortalModuleService;
import com.wsoft.response.ResponseResult;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.validation.Valid;

/**
 * @Author z001
 * @Date 2024/12/31 15:37
 */
@RestController
@Tag(name = "管理端-渲染")
@RequestMapping("/portal")
public class PortalRenderController {

    @Resource
    private IPortalModuleService moduleService;

    @Operation(summary = "渲染", description = "渲染")
    @PostMapping("/render")
    public ResponseResult render(@RequestBody @Valid RenderQuery query) {
        return ResponseResult.success(moduleService.render(query));
    }


}
